﻿using CommunityToolkit.Mvvm.ComponentModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using XYAC.Framework.MonitorTireMaterialManual.DataExporter;
using XYAC.Framework.MonitorTireMaterialManual.OracleRemoteDB;

namespace XYAC.Framework.MonitorTireMaterialManual.Entities
{
    public partial class PreCheckReport : ReportEntityBase
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public override int ID { get; set; }
        public override bool? IsDeleted { get; set; } = false;
        /// <summary>
        /// 检验员/工号
        /// </summary>
        [ObservableProperty]
        private string? _userId;
        /// <summary>
        /// 机台编号
        /// </summary>
        [Description("机台编号")]
        [ObservableProperty]
        private string? _eqp;

        /// <summary>
        /// 规格号
        /// </summary>
        [ObservableProperty]
        [Description("规格号")]
        private string? _specName;

        /// <summary>
        /// 实际规格号
        /// </summary>
        [Description("实际规格号")]
        [ObservableProperty]
        private string? _specNameInfact;


        /// <summary>
        /// 条码号 SERIAL_NUMBER
        /// </summary>
        [ObservableProperty]
        [Description("条码号")]
        private string? _serialNumber;

        /// <summary>
        /// 扫描时间
        /// </summary>
        [ObservableProperty]
        [Description("扫描时间")]
        private string? _scanedDatetime;


        /// <summary>
        /// 最后同步时间
        /// </summary>
        [ObservableProperty]
        private DateTime? _lastSyncDate = DateTime.Now;
        /// <summary>
        /// 同步状态
        /// </summary>
        [ObservableProperty]
        private Boolean _syncState = false;

        /// <summary>
        /// 备注
        /// </summary>
        [ObservableProperty]
        private string? _remark;

        /// <summary>
        /// 第一关键点厚度 标准
        /// </summary>
        [Description("第一关键点厚度 标准")]
        [ObservableProperty]
        private double? _data7;
        /// <summary>
        /// 第一关键点厚度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data21;
        /// <summary>
        /// 第二关键点厚度 标准
        /// </summary>
        [ObservableProperty]
        private double? _data8;
        /// <summary>
        /// 第二关键点厚度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data22;
        /// <summary>
        /// 第三关键点厚度 标准
        /// </summary>
        [ObservableProperty]
        private double? _data9;
        /// <summary>
        /// 第三关键点厚度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data23;

        /// <summary>
        /// 第四关键点厚度 标准
        /// </summary>
        [ObservableProperty]
        private double? _data10;
        /// <summary>
        /// 第四关键点厚度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data24;
        /// <summary>
        /// 第五关键点厚度 标准
        /// </summary>
        [ObservableProperty]
        private double? _data11;
        /// <summary>
        /// 第五关键点厚度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data25;

        /// <summary>
        /// 第六关键点厚度 标准
        /// </summary>
        [ObservableProperty]
        private double? _data12;
        /// <summary>
        /// 第六关键点厚度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data26;

        /// <summary>
        /// 第七关键点厚度 标准
        /// </summary>
        [ObservableProperty]
        private double? _data13;
        /// <summary>
        /// 第七关键点厚度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data27;

        /// <summary>
        /// 第一关键点宽度 标准
        /// </summary>
        [ObservableProperty]
        private double? _data14;
        /// <summary>
        /// 第一关键点宽度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data28;

        /// <summary>
        /// 第二关键点宽度 标准
        /// </summary>
        [ObservableProperty]
        private double? _data15;
        /// <summary>
        /// 第二关键点宽度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data29;

        /// <summary>
        /// 第三关键点宽度 标准
        /// </summary>
        [ObservableProperty]
        private double? _data16;
        /// <summary>
        /// 第三关键点宽度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data30;
        /// <summary>
        /// 第四关键点宽度 标准
        /// </summary>
        [ObservableProperty]
        private double? _data17;
        /// <summary>
        /// 第四关键点宽度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data31;

        /// <summary>
        /// 第五关键点宽度 标准
        /// </summary>
        [ObservableProperty]
        private double? _data18;
        /// <summary>
        /// 第五关键点宽度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data32;

        /// <summary>
        /// 第六关键点宽度 标准
        /// </summary>
        [ObservableProperty]
        private double? _data19;
        /// <summary>
        /// 第六关键点宽度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data33;

        /// <summary>
        /// 第七关键点宽度 标准
        /// </summary>
        [ObservableProperty]
        private double? _data20;
        /// <summary>
        /// 第七关键点宽度 实测
        /// </summary>
        [ObservableProperty]
        private double? _data34;

        /// <summary>
        /// 将 SemiSteelSideInspectionReport 实例转换为 YB_PROCESS_STEP 实例。
        /// </summary>
        /// <param name="report">要转换的 SemiSteelSideInspectionReport 实例。</param>
        /// <returns>转换后的 YB_PROCESS_STEP 实例。</returns>
        public override YB_PROCESS_STEP ToYB_PROCESS_STEP(DataFile dataFile)
        {
            var processStep = new YB_PROCESS_STEP();

            //this.UpdateProcessStep(processStep, dataFile);
            //这里是关键 把本地的ID值赋值给 LJ_ID 就不会再报错了。
            //但问题是其他三个没有这样做也成功上传了数据，需要跟张工确认下是否这三个也有数据（经确认是有数据的）。
            processStep.LJ_ID =0;
            processStep.IsDeleted = false;
            processStep.RECEIVE_DATE = null;
            processStep.PLAN_ID = this.PlanId;
            processStep.PART_NUMBER = this.SpecName;
            processStep.EQP = "RSS001";
            processStep.EQP_TYPE = "3";
            processStep.RECORD1 = this.UserId;
            processStep.RECORD2 = this.Eqp;
            processStep.RECORD3 = this.SpecName;
            processStep.RECORD4 = this.SpecNameInfact;
            processStep.RECORD5 = this.SerialNumber;
            processStep.RECORD6 = this.ScanedDatetime;
            processStep.RECORD7 = this.Shift;
            processStep.RECORD8 = this.Data7?.ToString("F2");
            processStep.RECORD9 = this.Data8?.ToString("F2");
            processStep.RECORD10 = this.Data9?.ToString("F2");
            processStep.RECORD11 = this.Data10?.ToString("F2");
            processStep.RECORD12 = this.Data11?.ToString("F2");
            processStep.RECORD13 = this.Data12?.ToString("F2");
            processStep.RECORD14 = this.Data13?.ToString("F2");
            processStep.RECORD15 = this.Data14?.ToString("F2");
            processStep.RECORD16 = this.Data15?.ToString("F2");
            processStep.RECORD17 = this.Data16?.ToString("F2");
            processStep.RECORD18 = this.Data17?.ToString("F2");
            processStep.RECORD19 = this.Data18?.ToString("F2");
            processStep.RECORD20 = this.Data19?.ToString("F2");
            processStep.RECORD21 = this.Data20?.ToString("F2");

            processStep.RECORD22 = this.Data21?.ToString("F2");
            processStep.RECORD23 = this.Data22?.ToString("F2");
            processStep.RECORD24 = this.Data23?.ToString("F2");
            processStep.RECORD25 = this.Data24?.ToString("F2");
            processStep.RECORD26 = this.Data25?.ToString("F2");
            processStep.RECORD27 = this.Data26?.ToString("F2");
            processStep.RECORD29 = this.Data27?.ToString("F2");
            processStep.RECORD30 = this.Data28?.ToString("F2");
            processStep.RECORD31 = this.Data29?.ToString("F2");
            processStep.RECORD32 = this.Data30?.ToString("F2");
            processStep.RECORD33 = this.Data31?.ToString("F2");
            processStep.RECORD34 = this.Data32?.ToString("F2");
            processStep.RECORD35 = this.Data33?.ToString("F2");
            processStep.RECORD36 = this.Data34?.ToString("F2");
            processStep.RECORD37 = this.Remark;
            /*
            processStep.RECORD1 = data.XReference.ToString("F2");// RECORD2 和 RECORD3 对应索引 0
            processStep.RECORD2 = data?.StableKeys?.Skip(0).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD3 = data?.MeasureKeys?.Skip(0).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD4 和 RECORD5 对应索引 1
            processStep.RECORD4 = data?.StableKeys?.Skip(1).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD5 = data?.MeasureKeys?.Skip(1).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD6 和 RECORD7 对应索引 2
            processStep.RECORD6 = data?.StableKeys?.Skip(2).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD7 = data?.MeasureKeys?.Skip(2).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD8 和 RECORD9 对应索引 3
            processStep.RECORD8 = data?.StableKeys.Skip(3).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD9 = data?.MeasureKeys?.Skip(3).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD10 和 RECORD11 对应索引 4
            processStep.RECORD10 = data?.StableKeys.Skip(4).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD11 = data?.MeasureKeys?.Skip(4).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD12 和 RECORD13 对应索引 5
            processStep.RECORD12 = data?.StableKeys.Skip(5).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD13 = data?.MeasureKeys?.Skip(5).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD14 和 RECORD15 对应索引 6
            processStep.RECORD14 = data?.StableKeys.Skip(6).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD15 = data?.MeasureKeys?.Skip(6).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD16 和 RECORD17 对应索引 7
            processStep.RECORD16 = data?.StableKeys.Skip(7).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD17 = data?.MeasureKeys?.Skip(7).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD18 和 RECORD19 对应索引 8
            processStep.RECORD18 = data?.StableKeys.Skip(8).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD19 = data?.MeasureKeys?.Skip(8).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD20 和 RECORD21 对应索引 9
            processStep.RECORD20 = data?.StableKeys.Skip(9).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD21 = data?.MeasureKeys?.Skip(9).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD22 和 RECORD23 对应索引 10
            processStep.RECORD22 = data?.StableKeys.Skip(10).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD23 = data?.MeasureKeys?.Skip(10).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD24 和 RECORD25 对应索引 11
            processStep.RECORD24 = data?.StableKeys.Skip(11).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD25 = data?.MeasureKeys?.Skip(11).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD26 和 RECORD27 对应索引 12
            processStep.RECORD26 = data?.StableKeys.Skip(12).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD27 = data?.MeasureKeys?.Skip(12).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD28 和 RECORD29 对应索引 13
            processStep.RECORD28 = (decimal?)(data?.StableKeys.Skip(13).Take(1).FirstOrDefault()?.Coordinate);
            processStep.RECORD29 = data?.MeasureKeys?.Skip(13).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD30 和 RECORD31 对应索引 14
            processStep.RECORD30 = data?.StableKeys.Skip(14).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD31 = data?.MeasureKeys?.Skip(14).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD32 和 RECORD33 对应索引 15
            processStep.RECORD32 = data?.StableKeys.Skip(15).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD33 = data?.MeasureKeys?.Skip(15).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD34 和 RECORD35 对应索引 16
            processStep.RECORD34 = data?.StableKeys.Skip(16).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD35 = data?.MeasureKeys?.Skip(16).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD36 和 RECORD37 对应索引 17
            processStep.RECORD36 = data?.StableKeys.Skip(17).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            
            processStep.RECORD37 = data?.MeasureKeys?.Skip(17).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            */
           
            // RECORD38 和 RECORD39 对应索引 18
            processStep.RECORD38 = "0";// data?.StableKeys.Skip(18).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD39 = "0";// data?.MeasureKeys?.Skip(18).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD40 和 RECORD41 对应索引 19
            processStep.RECORD40 = "0";//data?.StableKeys.Skip(19).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD41 = "0";//data?.MeasureKeys?.Skip(19).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD42 和 RECORD43 对应索引 20
            processStep.RECORD42 = "0";//data?.StableKeys.Skip(20).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD43 = "0";//data?.MeasureKeys?.Skip(20).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD44 和 RECORD45 对应索引 21
            processStep.RECORD44 = "0";//data?.StableKeys.Skip(21).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD45 = "0";// data?.MeasureKeys?.Skip(21).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD46 和 RECORD47 对应索引 22
            processStep.RECORD46 = "0";//data?.StableKeys.Skip(22).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD47 = "0";//data?.MeasureKeys?.Skip(22).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD48 和 RECORD49 对应索引 23
            processStep.RECORD48 = "0";//data?.StableKeys.Skip(23).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD49 = "0";//data?.MeasureKeys?.Skip(23).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD50 和 RECORD51 对应索引 24
            processStep.RECORD50 = "0";// data?.StableKeys.Skip(24).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD51 = "0";//data?.MeasureKeys?.Skip(24).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD52 和 RECORD53 对应索引 25
            processStep.RECORD52 = "0";//data?.StableKeys.Skip(25).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD53 = "0";//data?.MeasureKeys?.Skip(25).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD54 和 RECORD55 对应索引 26
            processStep.RECORD54 = "0";//data?.StableKeys.Skip(26).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD55 = "0";//data?.MeasureKeys?.Skip(26).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD56 和 RECORD57 对应索引 27
            processStep.RECORD56 = "0";//data?.StableKeys.Skip(27).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD57 = "0";//data?.MeasureKeys?.Skip(27).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            // RECORD58 和 RECORD59 对应索引 28
            processStep.RECORD58 = 0;// Round((decimal?)data?.StableKeys.Skip(28).Take(1).FirstOrDefault()?.Coordinate, 2);
            processStep.RECORD59 = 0;// Round((decimal?)data?.MeasureKeys?.Skip(28).Take(1).FirstOrDefault()?.Coordinate, 2);

            // RECORD60 和 RECORD61 对应索引 29
            processStep.RECORD60 = 0;// Round((decimal?)data?.StableKeys.Skip(29).Take(1).FirstOrDefault()?.Coordinate, 2);
            processStep.RECORD61 = 0;// Round((decimal?)data?.MeasureKeys?.Skip(29).Take(1).FirstOrDefault()?.Coordinate, 2);

            processStep.RECORD62 = 0;// Round((decimal?)data?.StableKeys.Skip(0).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD63 = 0;// Round((decimal?)data?.MeasureKeys?.Skip(0).Take(1).FirstOrDefault()?.Value, 2);

            processStep.RECORD64 = "0";//data?.StableKeys.Skip(1).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD65 = 0;// Round((decimal?)data?.MeasureKeys?.Skip(1).Take(1).FirstOrDefault()?.Value, 2);

            processStep.RECORD66 = 0;// Round((decimal?)data?.StableKeys.Skip(2).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD67 = 0;// Round((decimal?)data?.MeasureKeys?.Skip(2).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD68 = 0;// Round((decimal?)data?.StableKeys.Skip(3).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD69 = 0;// Round((decimal?)data?.MeasureKeys?.Skip(3).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD70 = 0;//Round((decimal?)data?.StableKeys.Skip(4).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD71 = 0;//Round((decimal?)data?.MeasureKeys?.Skip(4).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD72 = 0;//Round((decimal?)data?.StableKeys.Skip(5).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD73 = "0";// data?.MeasureKeys?.Skip(5).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD74 = 0;//Round((decimal?)data?.StableKeys.Skip(6).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD75 = 0;//Round((decimal?)data?.MeasureKeys?.Skip(6).Take(1).FirstOrDefault()?.Value, 2);

            processStep.RECORD76 = 0;//Round((decimal?)data?.StableKeys.Skip(7).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD77 = 0;//Round((decimal?)data?.MeasureKeys?.Skip(7).Take(1).FirstOrDefault()?.Value, 2);

            processStep.RECORD78 = 0;//Round((decimal?)data?.StableKeys.Skip(8).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD79 = 0;//Round((decimal?)data?.MeasureKeys?.Skip(8).Take(1).FirstOrDefault()?.Value, 2);

            processStep.RECORD80 = 0;//Round((decimal?)data?.StableKeys.Skip(9).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD81 = 0;//Round((decimal?)data?.MeasureKeys?.Skip(9).Take(1).FirstOrDefault()?.Value, 2);

            processStep.RECORD82 = 0;//Round((decimal?)data?.StableKeys.Skip(10).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD83 = 0;//Round((decimal?)data?.MeasureKeys?.Skip(10).Take(1).FirstOrDefault()?.Value, 2);

            processStep.RECORD84 = 0;//Round((decimal?)data?.StableKeys.Skip(11).Take(1).FirstOrDefault()?.Value, 2);
            processStep.RECORD85 = 0;//Round((decimal?)data?.MeasureKeys?.Skip(11).Take(1).FirstOrDefault()?.Value, 2);

            processStep.RECORD86 = "0";// data?.StableKeys.Skip(12).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD87 = "0";//data?.MeasureKeys?.Skip(12).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD88 = "0";// data?.StableKeys.Skip(13).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD89 = "0";//data?.MeasureKeys?.Skip(13).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD90 = "0";//data?.StableKeys.Skip(14).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD91 = "0";// data?.MeasureKeys?.Skip(14).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD92 = "0";// data?.StableKeys.Skip(15).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD93 = "0";//data?.MeasureKeys?.Skip(15).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD94 = "0";//data?.StableKeys.Skip(16).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD95 = "0";//data?.MeasureKeys?.Skip(16).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD96 = "0";//data?.StableKeys.Skip(17).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD97 = "0";//data?.MeasureKeys?.Skip(17).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD98 = "0";//data?.StableKeys.Skip(18).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD99 = "0";//data?.MeasureKeys?.Skip(18).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD100 = "0";//data?.StableKeys.Skip(19).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD101 = "0";//data?.MeasureKeys?.Skip(19).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD102 = "0";//data?.StableKeys.Skip(20).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD103 = "0";// data?.MeasureKeys?.Skip(20).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD104 = "0";//data?.StableKeys.Skip(21).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD105 = "0";//data?.MeasureKeys?.Skip(21).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD106 = "0";//data?.StableKeys.Skip(22).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD107 = "0";//data?.MeasureKeys?.Skip(22).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD108 = "0";//data?.StableKeys.Skip(23).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD109 = "0";//data?.MeasureKeys?.Skip(23).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD110 = "0";//data?.StableKeys.Skip(24).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD111 = "0";//data?.MeasureKeys?.Skip(24).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD112 = "0";// data?.StableKeys.Skip(25).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD113 = "0";//data?.MeasureKeys?.Skip(25).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD114 = "0";//data?.StableKeys.Skip(26).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD115 = "0";//data?.MeasureKeys?.Skip(26).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD116 = "0";//data?.StableKeys.Skip(27).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD117 = "0";//data?.MeasureKeys?.Skip(27).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD118 = "0";//data?.StableKeys.Skip(28).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD119 = "0";// data?.MeasureKeys?.Skip(28).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD120 = "0";//data?.StableKeys.Skip(29).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD121 = "0";//data?.MeasureKeys?.Skip(29).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD_DATE = ReportTime;
            //processStep.PART_NUMBER = data.TypeName;

            processStep.RECORD122 = "0";
            processStep.RECORD122 = "0";
            processStep.RECORD123 = "0";
            processStep.RECORD124 = "0";
            processStep.RECORD125 = "0";
            processStep.RECORD126 = "0";
            processStep.RECORD127 = "0";
            processStep.RECORD128 = "0";
            processStep.RECORD129 = "0";
            processStep.RECORD130 = "0";
            processStep.RECORD131 = "0";
            processStep.RECORD132 = "0";
            processStep.RECORD133 = "0";
            processStep.RECORD134 = "0";
            processStep.RECORD135 = "0";
            processStep.RECORD136 = "0";
            processStep.RECORD137 = "0";
            processStep.RECORD138 = "0";
            processStep.RECORD139 = "0";
            processStep.RECORD140 = "0";
            processStep.RECORD141 = "0";
            processStep.RECORD142 = "0";
            processStep.RECORD143 = "0";
            processStep.RECORD144 = "0";
            processStep.RECORD145 = "0";
            processStep.RECORD146 = "0";
            processStep.RECORD147 = "0";
            processStep.RECORD148 = "0";
            processStep.RECORD149 = "0";
            processStep.RECORD150 = "0";
            processStep.RECORD151 = "0";
            processStep.RECORD152 = "0";
            processStep.RECORD153 = "0";
            processStep.RECORD154 = "0";
            processStep.RECORD155 = "0";
            processStep.RECORD156 = "0";
            processStep.RECORD157 = "0";
            processStep.RECORD158 = "0";
            processStep.RECORD159 = "0";
            processStep.RECORD160 = "0";
            processStep.RECORD161 = "0";
            processStep.RECORD162 = "0";
            processStep.RECORD163 = "0";
            processStep.RECORD164 = "0";
            processStep.RECORD165 = "0";
            processStep.RECORD166 = "0";
            processStep.RECORD167 = "0";
            processStep.RECORD168 = "0";
            processStep.RECORD169 = "0";
            processStep.RECORD170 = "0";
            processStep.RECORD171 = "0";
            processStep.RECORD172 = "0";
            processStep.RECORD173 = "0";
            processStep.RECORD174 = "0";
            processStep.RECORD175 = "0";
            processStep.RECORD176 = "0";
            processStep.RECORD177 = "0";
            processStep.RECORD178 = "0";
            processStep.RECORD179 = "0";
            processStep.RECORD180 = "0";
            processStep.RECORD181 = "0";
            processStep.RECORD182 = "0";
            processStep.RECORD183 = "0";

            processStep.RECORD184 = "0";// data?.StableKeys.Skip(30).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD185 = "0";// data?.MeasureKeys?.Skip(30).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            processStep.RECORD186 = "0";//data?.StableKeys.Skip(31).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD187 = "0";//data?.MeasureKeys?.Skip(31).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            processStep.RECORD188 = "0";//data?.StableKeys.Skip(32).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD189 = "0";//data?.MeasureKeys?.Skip(32).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            processStep.RECORD190 = "0";//data?.StableKeys.Skip(33).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD191 = "0";//data?.MeasureKeys?.Skip(33).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            processStep.RECORD192 = "0";//data?.StableKeys.Skip(34).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD193 = "0";// data?.MeasureKeys?.Skip(34).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            processStep.RECORD194 = "0";//data?.StableKeys.Skip(35).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD195 = "0";// data?.MeasureKeys?.Skip(35).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            processStep.RECORD196 = "0";//data?.StableKeys.Skip(36).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD197 = "0";//data?.MeasureKeys?.Skip(36).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            processStep.RECORD198 = "0";//data?.StableKeys.Skip(37).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD199 = "0";//data?.MeasureKeys?.Skip(37).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            processStep.RECORD200 = "0";//data?.StableKeys.Skip(38).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            processStep.RECORD201 = "0";

            processStep.RECORD202 = "0";//data?.StableKeys.Skip(38).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            processStep.RECORD203 = "0";// data?.MeasureKeys?.Skip(39).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");
            processStep.RECORD204 = "0";// data?.StableKeys.Skip(39).Take(1).FirstOrDefault()?.Coordinate.ToString("F2");

            processStep.RECORD205 = "0";//data?.MeasureKeys?.Skip(30).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD206 = "0";//data?.StableKeys.Skip(30).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD207 = "0";//data?.MeasureKeys?.Skip(31).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD208 = "0";// data?.StableKeys.Skip(31).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD209 = "0";//data?.MeasureKeys?.Skip(32).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD210 = "0";//data?.StableKeys.Skip(32).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD211 = "0";//data?.MeasureKeys?.Skip(33).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD212 = "0";//data?.StableKeys.Skip(33).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD213 = "0";// data?.MeasureKeys?.Skip(34).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD214 = "0";// data?.StableKeys.Skip(34).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD215 = "0";// data?.MeasureKeys?.Skip(35).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD216 = "0";//data?.StableKeys.Skip(35).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD217 = "0";// data?.MeasureKeys?.Skip(36).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD218 = "0";// data?.StableKeys.Skip(36).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD219 = "0";// data?.MeasureKeys?.Skip(37).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD220 = "0";//data?.StableKeys.Skip(37).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD221 = "0";// data?.MeasureKeys?.Skip(38).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD222 = "0";//data?.StableKeys.Skip(38).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD223 = "0";//data?.MeasureKeys?.Skip(39).Take(1).FirstOrDefault()?.Value.ToString("F2");
            processStep.RECORD224 = "0";// data?.StableKeys.Skip(39).Take(1).FirstOrDefault()?.Value.ToString("F2");

            processStep.RECORD225 = "0";
            processStep.RECORD226 = "0";
            processStep.RECORD227 = "0";
            processStep.RECORD228 = "0";
            processStep.RECORD229 = "0";
            processStep.RECORD230 = "0";

     
            //RECORD159 = this.UserId,
            //RECORD160 = this.Shift,//班次
            //RECORD161 = this.SpecNameInfact,//实际规格
            //RECORD162 = this.Remark,//备注
         
            return processStep;
        }

    }
}
